package models.venue.field;

import models.BaseModel;
import models.merchant.Merchant;
import models.venue.enums.FieldType;
import models.venue.enums.OccupiedStatus;

import javax.persistence.*;

/**
 * 场地
 * Created by hanbin on 2017/4/5.
 */
@Entity
@Table(name="field_infos")
public class Field extends BaseModel{


    /**
     * 场地名称
     */
    @Column(name="field_name", length = 255)
    public String fieldName;

    /**
     * 场地类型
     */
    @Enumerated(EnumType.STRING)
    @Column(name="field_type", length = 255)
    public FieldType fieldType;

    /**
     * 所属店面
     */
    @JoinColumn(name="merchant_id")
    @ManyToOne
    public Merchant merchant;

    /**
     * 描述
     */
    @Column(name="remark", length = 255)
    public String remark;

    /**
     * 交易量
     */
    @Column(name = "trading_volume")
    public Integer tradingVolume;

    /**
     * 场地容量,xx个人
     */
    @Column(name = "capacity")
    public Integer capacity;

    /**
     * 场地占用状态
     */
    @Enumerated(EnumType.STRING)
    @Column(name="field_status", length = 255)
    public OccupiedStatus occupiedStatus;

    /**
     * 是否独占0 否,1 是
     */
    @Column(name = "is_monopoly")
    public Integer isMonopoly;
}
